<div class="top-bar clearfix">
    <div class="logo pull-left">
        <img class="cursor-pointer" ng-click="goUrl('app.workBoard.main')" src="assets/img/logo.png"/>
    </div>
    <div class="nav">
        <div ng-scrollbar scrollbar-x="true" scrollbar-y="false" style="height: 57px;"
             scrollbar-config="{autoResize: true, scrollbar:{width: 6, color: 'rgba(0,113,255,.4)'}, scrollbarContainer: {width: 8}}">
            <ul class="clearfix" ng-style="navWidth">
                <li class="pull-left" ng-repeat="item in allMenus" ng-click="clickTopMenu(item)" ng-if="!item.hidden && item.children&&item.children.length>0"
                    ng-class="{'active':curState.includes('{{item.state}}')}">
                    {{allowI18n?(item.name|translate):item.name}}
                    <a class="m-l-xs" title="{{allowI18n?('在新标签页中打开'|translate):'在新标签页中打开'}}" ng-click="clickTopMenu(item, true, $event)"><i class="yb-icon ico-new-tab"></i></a>
                </li>
            </ul>
        </div>
    </div>
    <select class="lan-select" ng-model="currentLan" ng-change="switchLan(currentLan)">
        <option value="zh-CN">中文</option>
        <option value="en-US">English</option>
        <option value="es-ES">Español</option>
        <option value="in">Indonesia</option>
        <option value="ru">Russian</option>
    </select>
    <div class="user-msg pull-right">
        <div class="pull-left cursor-pointer wrapper-x-sm">
            <div class="spill-dots" title="{{curUser.name}}">
                {{curUser.name}}
            </div>
            <ul class="drop-nav">
                <li class="cursor-pointer" ng-click="goUrl('app.personal.info')">{{allowI18n?('个人信息'|translate):'个人信息'}}</li>
                <li class="cursor-pointer" ng-click="goUrl('app.personal.changePwd')">{{allowI18n?('修改密码'|translate):'修改密码'}}</li>
            </ul>
        </div>
        <div class="pull-left cursor-pointer wrapper-x-sm" ng-click="logout()">
            <div><i class="yb-icon ico-quit"></i> {{allowI18n?('退出'|translate):'退出'}}</div>
        </div>
    </div>
</div>
<div class="side-bar" ng-class="{'hide-side': !app.settings.sideBar}">
    <div class="nav-name">
        <i class="yb-icon ico-site-map-o font-14 m-r-xs"></i>{{allowI18n?(subMenu.name|translate):subMenu.name}}
    </div>
    <div class="nav-container">
        <div ng-scrollbar scrollbar-x="false" scrollbar-y="true"
             scrollbar-config="{show: true, autoResize: true, scrollbar:{width: 8, color: 'rgba(255,255,255,.4)'}, scrollbarContainer: {width: 10}}">
            <dl>
                <dd ng-repeat="item in subMenu.children">
                    <div ng-class="{'active': curState.includes('{{item.state}}') && item.leaf === 1}" ng-click="clickLeftMenu(item)">
                        <i class="yb-icon ico-logo"></i>
                        <span class="spill-dots menu-m" title="{{allowI18n?(item.name|translate):item.name}}">{{allowI18n?(item.name|translate):item.name}}</span>
                        <a class="m-l-xs" target="_blank" ui-sref="{{item.state}}" title="{{allowI18n?('在新标签页中打开'|translate):'在新标签页中打开'}}" ng-click="$event.stopPropagation()" ng-if="item.children.length === 0&&!item.partsUrl"><i class="yb-icon ico-new-tab"></i></a>
                        <a class="m-l-xs" href="javascript:void(0)" title="{{allowI18n?('在新标签页中打开'|translate):'在新标签页中打开'}}" ng-if="item.children.length === 0&&item.partsUrl"><i class="yb-icon ico-new-tab"></i></a>
                        <i class="yb-icon pull-right" ng-class="{'ico-chevron-down': item.children.length > 0 && !!item.isCollapsed, 'ico-chevron-up': item.children.length > 0 && !item.isCollapsed}"></i>
                    </div>
                    <ul ng-if="!item.isCollapsed && item.children.length > 0">
                        <li ng-repeat="subItem in item.children track by $index" ng-click="clickLeftMenu(subItem)"
                            ng-class="{'active': curState.includes('{{subItem.state}}')}">
                            <span class="spill-dots menu-m" title="{{allowI18n?(subItem.name|translate):subItem.name}}">{{allowI18n?(subItem.name|translate):subItem.name}}</span>
                            <a class="m-l-xs" target="_blank" ui-sref="{{subItem.state}}" title="{{allowI18n?('在新标签页中打开'|translate):'在新标签页中打开'}}" ng-click="$event.stopPropagation()" ng-if="!subItem.partsUrl"><i class="yb-icon ico-new-tab"></i></a>
                            <a class="m-l-xs" href="javascript:void(0)" title="{{allowI18n?('在新标签页中打开'|translate):'在新标签页中打开'}}" ng-if="subItem.partsUrl"><i class="yb-icon ico-new-tab"></i></a>
                        </li>
                    </ul>
                </dd>
            </dl>
        </div>
    </div>
    <div class="switch-btn text-center" ng-class="{'cursor-pointer': subMenu.children.length > 0}" ng-click="toggleLeftMenu()">
        <i class="yb-icon pos-r" ng-class="{'ico-close-side': app.settings.sideBar, 'ico-open-side': !app.settings.sideBar}"
           ng-if="subMenu.children.length > 0"></i>
    </div>
</div>

<div class="main-body" ng-class="{'hide-side': !app.settings.sideBar}">
    <div ui-view></div>
</div>
